<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title></title>
	<script type="text/javascript">
    function init () {
        document.addEventListener("keydown",function (event) {
            console.log(event.target);
            if(event.keyCode==13&&event.target.type!='button'&&event.target.type!='submit'&&
             event.target.type!='reset'&&event.target.type!=='textarea'&&event.target.type!=''){
                event.target.nextElementSibling.nextElementSibling.focus();
                console.log(event.target.nextElementSibling);
                console.log(event.target.nextElementSibling.nextElementSibling);
            }
        },false);
        document.getElementById("form_btn_add_user").addEventListener("click",function () {
            alert("ok");
        },false);
    }
    window.addEventListener("load",init,false);
	</script>
	</head>
	<body>
		<fieldset id="addUser">
			<legend>添加用户信息</legend>
			<input type="hidden" name="add_id" id="add_id" value="" />
			<label for="add_userName">用户名：</label>
			<input type="text" name="userName" id="add_userName" value="" /><br>
			<label for="add_password">密码：</label>
			<input type="password" name="password" id="add_password" value="" /><br>
			<label for="add_address">地址：</label><input type="text" name="address" id="add_address" value="" /><br>
			<input id="form_btn_add_user" type="button" value="新增" />
		</fieldset>
	</body>
</html>